package com.abigoni.ciaomondoandroid.bflows.helper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyDbHelper extends SQLiteOpenHelper{

	private static final String DB_NAME  = "utenti";
	private static final int DB_VERSIONE = 1;


	public MyDbHelper(Context context) {
		super(context,DB_NAME,null,DB_VERSIONE);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {

		StringBuffer sql = new StringBuffer();
		sql.append(" CREATE TABLE IF NOT EXISTS UTENTI (" +
				" ID INTEGER PRIMARY KEY AUTOINCREMENT," +
				" NOME TEXT," +
				" COGNOME TEXT," +
				" EMAIL TEXT, " +
				" CD_USER TEXT NOT NULL UNIQUE," +
				" PWD TEXT NOT NULL" +
				")");

		db.execSQL(sql.toString());
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

	}
}